package 补充.输入输出操作.文件操作;

import java.io.*;

public class 转换流 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\Learn\\javademo\\untitled\\src\\补充_偏\\输入输出操作\\read.txt");
        InputStreamReader isr = new InputStreamReader(fis);
        FileOutputStream fos = new FileOutputStream("D:\\Learn\\javademo\\untitled\\src\\补充_偏\\输入输出操作\\read2.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos);
        int str;
        while ((str=isr.read())!=-1){
            osw.write(str);
        }
        isr.close();
        osw.close();
        fos.close();
        fis.close();
    }
}
